package com.sea.base.vm

/**
 * @param code 服务器返回的状态码
 * @param netCode 网络状态码和其他异常状态码[NET_EXCEPTION_CODE]
 */
class BaseNetException(
    val code: Int,
    val netCode: Int = NET_SUCCESS_CODE,
    val msg: String = "",
    cause: Throwable? = null
) : Throwable("NetException:$msg:$code:$netCode", cause) {

    companion object {
        const val NET_SUCCESS_CODE = 200
        const val NET_EXCEPTION_CODE = -999
        const val NET_LOGIN_OUT_CODE = 403

        /**
         * list或者data为null或空的code码
         */
        const val NET_EMPTY_CODE = -998
    }
}